texture: Add GdkMemoryTexture
authorBenjamin Otte <otte@redhat.com>
Tue, 6 Mar 2018 02:41:13 +0000 (03:41 +0100)
committerBenjamin Otte <otte@redhat.com>
Wed, 7 Mar 2018 15:17:15 +0000 (16:17 +0100)
commit8920639a2b9f244bf0fabd00ee762cc12b123d52
treed6108a3d9f71463f659fc29ff18cd69371b9e89e
parent160e6ad6f6fcc9c2819b2f8378763771f14c5320
texture: Add GdkMemoryTexture

GdkMemoryTexture is a texture implementation for holding data in memory
(read: GBytes). You specify the GdkMemoryFormat that data is in and off
you go.

Renderers can use this to add uploads in various different formats and
don't need to fallback to GDK doing the conersion on the CPU.

Supported formats can be extended if we need new ones, for now I just
added the relevant ones for Cairo and GdkPixbuf.

The constructor is also private still, because I'm not sure we want to
export GdkMemoryFormat.
Wrappers that do from_cairo_surface() and for_pixbuf() do exist though.
gdk/gdkmemorytexture.c [new file with mode: 0644]
gdk/gdkmemorytextureprivate.h [new file with mode: 0644]
gdk/gdktexture.c
gdk/meson.build